﻿namespace DataScripter.Excel.Formulas
{
	internal class Table : Formula
	{
		private readonly string _start;
		private readonly string _end;

		public Table(ICell startCell, int rows, int columns)
		{
			_start = startCell.AbsoluteCellReference;
			_end = startCell.GetDiff(rows - 1, columns - 1).AbsoluteCellReference;
		}

		public override string ToString()
		{
			return _start + ":" + _end;
		}

		public override string Resolve(ICell current)
		{
			return ToString();
		}
	}
}